Skip to content

Conversation

@danieldegrasse
Copy link
Contributor

@danieldegrasse danieldegrasse commented Feb 21, 2022

This PR adds an initial implementation of pinctrl for kinetis series MCUs, with the UART driver enabled. It is based on the work in #39743, but uses a pin group based approach instead of pin nodes. Pin mux configurations are defined at the SOC level as constant values, and these values are referenced in the pin groups in order to select pin mux options.

Copy link
Member

@gmarull gmarull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM, I have some minor comments

@dleach02 dleach02 added this to the v3.1.0 milestone Feb 22, 2022
@zephyrbot zephyrbot added area: UART Universal Asynchronous Receiver-Transmitter area: Build System labels Feb 22, 2022
@SebastianBoe SebastianBoe removed their request for review February 22, 2022 14:47
gmarull
gmarull previously approved these changes Feb 26, 2022
Copy link
Member

@gmarull gmarull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I have a few minor questions/suggestions.

@github-actions
Copy link

github-actions bot commented Feb 28, 2022

The following west manifest projects have been modified in this Pull Request:

Name Old Revision New Revision Diff
hal_nxp zephyrproject-rtos/hal_nxp@9629f15 zephyrproject-rtos/hal_nxp@072bf81 (master) zephyrproject-rtos/[email protected]

Note: This message is automatically posted and updated by the Manifest GitHub Action.

gmarull
gmarull previously approved these changes Mar 1, 2022
NXP hal pinctrl header files are required for pin groups. Update HAL
revision to pull in pinctrl header files.

Signed-off-by: Daniel DeGrasse <[email protected]>
Add pinctrl include file to define SOC specific pinctrl_soc_t structure,
used to store pin configuration for pinctrl driver

Signed-off-by: Daniel DeGrasse <[email protected]>
Add kinetis pinctrl driver. Driver initializes clocks for each port, and
exposes the pinctrl_configure_pins function required for pinctrl
support.

Signed-off-by: Daniel DeGrasse <[email protected]>
Add pinctrl node group bindings for kinetis MCUs

Signed-off-by: Daniel DeGrasse <[email protected]>
Kinetis pinctrl groups need dummy pinctrl node to populate with pinctrl
options at the board level. Add one in each

Signed-off-by: Daniel DeGrasse <[email protected]>
Add pinctrl support to mcux uart driver

Signed-off-by: Daniel DeGrasse <[email protected]>
Add board level pin group definitions, and remove uart pinmux
driver calls.

pinctrl is enabled for uart driver

Signed-off-by: Daniel DeGrasse <[email protected]>
Add pinctrl nodes for frdm_kw41z

Signed-off-by: Daniel DeGrasse <[email protected]>
Add pinctrl groups for hexiwear_k64, and enable pinctrl

Signed-off-by: Daniel DeGrasse <[email protected]>
Enable pinctrl for hexiwear kw40z target

Signed-off-by: Daniel DeGrasse <[email protected]>
Add pinctrl groups for ip_k66f

Signed-off-by: Daniel DeGrasse <[email protected]>
Add pinctrl nodes for frdm_k22f

Signed-off-by: Daniel DeGrasse <[email protected]>
Add pinctrl groups for frdm_k82f

Signed-off-by: Daniel DeGrasse <[email protected]>
Add pinctrl groups for frdm_kl25z

Signed-off-by: Daniel DeGrasse <[email protected]>
Add pinctrl groups for rddrone_fmuk66

Signed-off-by: Daniel DeGrasse <[email protected]>
Add pinctrl groups for twr_ke18f

Signed-off-by: Daniel DeGrasse <[email protected]>
Add pinctrl groups for twr_kv58f220m

Signed-off-by: Daniel DeGrasse <[email protected]>
Add pinctrl groups for usb_kw24d512

Signed-off-by: Daniel DeGrasse <[email protected]>
SOC specific wrapper files were used to include pinctrl DTSI files.
Remove these in favor of including pinctrl header files directly from
board pinctrl definitions.

Signed-off-by: Daniel DeGrasse <[email protected]>
@github-actions github-actions bot removed the DNM This PR should not be merged (Do Not Merge) label Mar 2, 2022
@mbolivar-nordic
Copy link
Contributor

@gmarull please re-approve

@mbolivar-nordic
Copy link
Contributor

@dleach02 @mmahadevan108 please review

@dleach02 dleach02 merged commit 062c45a into zephyrproject-rtos:main Mar 3, 2022
@dleach02 dleach02 deleted the kinetis-pinctrl branch March 3, 2022 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants